package io.gps.datatransfer.task;

import io.gps.datatransfer.utils.SysDef;
import org.apache.log4j.Logger;

/**
 * 检查上级服务器是否正常
 */
public class CheckServerTask implements Runnable {

    private Logger logger = Logger.getLogger(CheckServerTask.class);

    @Override
    public void run() {
        try {
            if(SysDef.UP_SERVER!=null){
                for (int i = 0; i < SysDef.UP_SERVER.size(); i++) {
                    SysDef.UP_SERVER.get(i).setUse();
                }
            }
        } catch (Exception e) {
            logger.error("CheckServerTask : Chenk Server  ERROR!", e);
        }
    }
}
